mylist = []

flag = '>>>'

while flag != 'CEASE':
    inp = input('?')
    flag = inp
    if flag == 'CEASE':
        break
    mylist.append(inp)

mid = int(len(mylist) / 2)

print(mylist[0], '*', mylist[len(mylist) - 1], '*', mylist[mid - 1])

print(mylist[:mid - 1])
print(mylist[mid - 1:])
